@inject NavigationManager NavigationManager

<div class="col position-relative">
    <img src="@Image" class="img-fluid img-thumbnail" alt="Vehicle">
    <p class="text-muted small mt-3 pt-2 text-end px-md-5 px-xxl-0 me-3 border-top">
        Photo by @Copyright from Pexels
    </p>
    <div class="btn-group col-12 px-2 px-xxl-5">
        <button class="col-6 btn btn-primary" @onclick="RentalCar">Rent</button>
        <button class="col-6 btn btn-outline-primary" @onclick="SeeInformationCar">More Info.</button>
    </div>
    <a class="position-absolute" type="button" @onclick="@SeeLoansCar" style="top: 3%; right: 10%">
        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="text-warning" viewBox="0 0 16 16">
            <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/>
        </svg>
    </a>
</div>

@code {

    [Parameter]
    public string License { get; set; }

    [Parameter]
    public string Image { get; set; }

    [Parameter]
    public string Copyright { get; set; }

    private void SeeLoansCar()
    {
        NavigationManager.NavigateTo("/Loan/" + License);
    }
    
    private void SeeInformationCar()
    {
        NavigationManager.NavigateTo("/Vehicle/" + License);
    }

    private void RentalCar()
    {
        NavigationManager.NavigateTo("/Rent/" + License);
    }

}